/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.chl.johanwi.jsfproducts;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Schtohan
 */
@ManagedBean(name = "DateTimeSessionBean")
@RequestScoped
public class DateTimeSessionBean implements Serializable {

    /** Creates a new instance of DateTimeSessionBean */
    public DateTimeSessionBean() {
    
    }
    
    public String getCurrentDateTime() {
        DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        Date date = new Date();
        return dateFormat.format(date);
    }
    
}
